package com.xuzz.study.designpattern.singleton;

public class Singleton {
    private Singleton(){}

    public static Singleton instance(){
        return Holder.singleton;
    }

    private static class Holder
    {
        private static Singleton singleton = new Singleton();
    }

    public void say()
    {
        System.out.println("this is a singleton instance ");
    }
}
